//
//  PhotoAssetPreviewViewController.h
//  XPhoto
//
//  Created by baboy on 2020/6/22.
//  Copyright © 2020 baboy. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "PhotoAsset.h"
#import "BKPlayerView.h"
#import <BKKit/BKProgressBar.h>

NS_ASSUME_NONNULL_BEGIN
@class PhotoPreviewView;
@interface PhotoAssetPreviewViewController : UIViewController
@property(nonatomic, strong) IBOutlet UIScrollView *contentView;
@property(nonatomic, strong) IBOutlet UIStackView *contentStackView;
@property(nonatomic, strong) NSOperationQueue *photoLoadQueue;

- (PhotoPreviewView *)createPlayerWithPhotoAsset:(PhotoAsset *)photoAsset;
- (PhotoPreviewView *)createImageViewWithPhotoAsset:(PhotoAsset *)photoAsset;
- (PhotoPreviewView *)createItemViewWithPhotoAsset:(PhotoAsset *)photoAsset;
- (PhotoPreviewView *)createItemViewWithAsset:(PHAsset *)asset;
@end
@interface PhotoPreviewView : UIView
@property(nonatomic, assign) NSInteger mediaType;
@property(nonatomic, strong) UIImageView *imageView;
@property(nonatomic, strong) BKPlayerView *playerView;
@property(nonatomic, strong) CircleProgressBar *progressView;
@property(nonatomic, assign) double loadProgress;

- (id)initWithFrame:(CGRect)frame withMediaType:(NSInteger)mediaType;
@end
NS_ASSUME_NONNULL_END
